package com.zp.service;

import java.util.HashMap;
import java.util.Map;

public class FillCountServieFactory {

    private static Map<Integer, FillCountService> fillCountServiceMap = new HashMap<>();

    static {
        fillCountServiceMap.put(1, (countRecoder, count) -> {
            countRecoder.setCountOfFirstStage(count);
            return countRecoder;
        });
        fillCountServiceMap.put(2, (countRecoder, count) ->{
            countRecoder.setCountOfSecondStage(count);
            return countRecoder;
        } );
        fillCountServiceMap.put(3, (countRecoder, count) ->{
            countRecoder.setCountOfThirdtage(count);
            return countRecoder;
        } );
       // fillCountServiceMap.put(4, (countRecoder, count) -> countRecoder.setCountOfForthtage(count));
       // fillCountServiceMap.put(5, (countRecoder, count) -> countRecoder.setCountOfFirthStage(count));
    }

    public static FillCountService getFillCountStrategy(int statusCode) {
        return fillCountServiceMap.get(statusCode);
    }
}